package leetcode.code1716;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public class Solution implements IDebug {

	public int totalMoney(int n) {
		int div = n / 7;
		int len = n % 7;
		int ans = div * 28 + div * (div - 1) * 7 / 2;
		ans += (div + 1 + div + len) * len / 2;
		return ans;
	}

	public static void main(String[] args) {
		Solution so = new Solution();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();
	}

	@Override
	public void debug1() {
		HelpDebug.compare(96, this.totalMoney(20));

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}
}
